#include "apue.h"
#include "util/path_alloc_.c"

int main(int argc, char *argv[])
{
    if(argc != 2)
        err_quit("exec param error");

    char *ptr;
    size_t size;

    if(chdir(argv[1]) < 0)
        err_sys("chdir failed");
    ptr = path_alloc_(&size);
    
    if((ptr = getcwd(ptr, size)) == NULL){
        err_sys("getcwd failed");
    }

    return 0;
}